function colored = MyFlowToColor(flowX, flowY, thresh)
    flow(:, :, 1) = flowX;
    flow(:, :, 2) = flowY;
    if nargin > 2
        colored = flowToColor(flow, thresh);
    else
        colored = flowToColor(flow);
    end
end

